<?php
		include("session.inc");	
		include("dbconn.inc");
		include("dbfuc.inc");			
		$user=$_SESSION["user"];
		$curid=$_SESSION["curid"];
		$dbconnection=$_SESSION["dbconnection"];		
		$dbconnection=$_SESSION["dbconnection"];		
	if(session_is_registered("dbconnection") )
	{

			$sql="";
			$rs="";
			$numrows=0;
			$cCode="";$cCodeDesc="";$cSelect="";
			$cSide="";
			$cUpline="";
			$cUpline=$_REQUEST["mRgeYneGDgporhid"];
			$cSide=$_REQUEST["greateposition"];

			if($cUpline =="")
			{
			}else{
				
				$upline_id= base64_decode($cUpline);
				$POSITION= base64_decode($POSITION);
				$cUpline=get_username($upline_id);
				$_SESSION['cUpline']=$cUpline;	
			}
			if($cSide =="")
			{
			}else{
				if($cSide=="L")
					$cSide="l";
				if($cSide=="R")
					$cSide="r";
				$_SESSION['cSideId']=$cSide;	
			}
			

			if(($user!="") && (($curid!="") || ($curid!=0)))
			{
		
?>
<html>
<head>
<title>inner</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {	font-size: 9px;
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-weight: bold;
}
.style7 {font-family: Geneva, Arial, Helvetica, sans-serif}
-->
</style>
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="ahahLib.js"></script> 
<script language="JavaScript" type="text/javascript">
function makeactive() { 
 		val=document.regform.txtLogin.value;
		if(val=="" || val==null || val==" ")
		{
			alert ("Enter SBC Code");
		}
		else
		{
	 callAHAH('check_userexist.php?val='+val, 'content',
     'Checking. Wait...', 'Error'); 
	 }
	 }

</script>
<script  language="JavaScript" src="JStest.js">
</script>

<script language="JavaScript" >
function submHide()
{
	if(document.regform.termCheck.checked)
	document.getElementById("submitIdHide").style.display='';
	else
	document.getElementById("submitIdHide").style.display='none';
	
	
}
</script>
</head>
<body bgcolor="#FFFFFF" onLoad="submHide()">
<!-- ImageReady Slices (inner.psd) -->
<table id="Table_01" width="1003" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="10"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1003" height="167">
          <param name="movie" value="images/inner_header.swf">
          <param name="quality" value="high">
          <embed src="images/inner_header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1003" height="167"></embed>
	    </object></td>
	</tr>
	<tr>
		<td rowspan="2">
			<img src="images/inner_02.jpg" width="220" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_03.jpg" width="98" height="29" alt=""></td>
		<td>
			<img src="images/inner_04.jpg" width="44" height="6" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_05.jpg" width="47" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_06.jpg" width="54" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_07.jpg" width="102" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_08.jpg" width="96" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_09.jpg" width="124" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_10.jpg" width="106" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_11.jpg" width="112" height="29" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/inner_12.jpg" width="44" height="23" alt=""></td>
	</tr>
	<tr>
		<td height="19" background="images/inner_15.jpg">&nbsp;</td>
		<td colspan="9" rowspan="2" valign="top" bgcolor="#FFFFFF"><p>&nbsp;</p>
          <table width="98%" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td>	
<?php
			
			$RegStatus=$_SESSION['cmbRegStatus'];	
			$FnameReg=$_SESSION['txtFnameReg'];	
			$tiksex=$_SESSION['regtiksex'];	
			$Country=$_SESSION['regCountry'];	
			$Addr1Reg=$_SESSION['txtAddr1Reg'];	
			$Addr2Reg=$_SESSION['txtAddr2Reg'];	
			$Addr3Reg=$_SESSION['txtAddr3Reg'];	
			$StateReg=$_SESSION['cmbStateReg'];	
			$PinCodeReg=$_SESSION['txtPinCodeReg'];	
			$EmailReg=$_SESSION['txtEmailReg'];	
			$PhoneReg=$_SESSION['txtPhoneReg'];	
			$Phone2Reg=$_SESSION['txtPhone2Reg'];	
			
			$BsnsName=$_SESSION['cBsnsName'];	
			$Password=$_SESSION['cPassword'];	
			$Upline=$_SESSION['cUpline'];	
			$UplineId=$_SESSION['nUplineId'];	
			$cRefferal=$_SESSION['cRefferal'];		
			$SideId=$_SESSION['cSideId'];	
			$SecretQuest=$_SESSION['cSecretQuest'];	
			$Answ=$_SESSION['cAnsw'];	
			$ccouponuser=$_SESSION['ccouponuser'];
			$ccouponpassword=$_SESSION['ccouponpassword'];
			$pin1=$_SESSION['pin1'];
			$pin2=$_SESSION['pin2'];
			$pin3=$_SESSION['pin3'];
			$pin4=$_SESSION['pin4'];			



?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td><br>
        <table width="50%" height="24" border="0" align="center" cellspacing="1">
          <tr>
            <td height="22"><div align="center"><span class="style14"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><font size="4">Registration Form</font></font></span></div></td>
          </tr>
        </table>
        <b><font class="s"><font  size="1" face="Verdana, Arial, Helvetica, sans-serif"></font></font></b>
        <form name="regform" method="post" action="registration_step2.php" onSubmit="return validateForm();">
          <table width="100%" height="0" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
            <tr >
              <td width="400%" height="30" align="left" background="images/footer_12.jpg"><span class="style18">Fill your contact information</span></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td height="415" align="left" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="4" cellpadding="4">
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td width="23%" height="0" valign="middle" bgcolor="#FFFFFF" class="texture style9"> Full Name</td>
                    <td width="2%" valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="0" colspan="4" valign="middle" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <select name="cmbRegStatus" class="BPO_TEXT" id="cmbRegStatus">
                        <option value="none" selected><font face="Verdana, Arial, Helvetica, sans-serif" size="1">---Status--</font></option>
                        <?php                                
		   		
        $sql="select c_code,c_code_desc from mlm_combo_value where c_code_type='MREGS'";
		$rs=mysql_query($sql);
		$numrows=mysql_num_rows($rs);
   		while($numrows >0)
   		{
			$numrows=$numrows-1;
        	$cCode=mysql_result($rs,$numrows,"c_code");
        	$cCodeDesc=mysql_result($rs,$numrows,"c_code_desc");
			if($cCode==$RegStatus){
				echo "<option value='".$cCode."' selected>".$cCodeDesc."</option>";
			}	
			else
			{
				echo  "<option value='".$cCode."'>".$cCodeDesc."</option>";
			}			
	     }
	   
?>
                      </select>
                      <input  name="txtFnameReg" type="text" class="BPO_TEXT" id="txtFnameReg" size="54" maxlength="70" value="<?php echo $FnameReg ?> " >
                    </font><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">*</font></td>
                    <td width="11%" valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td height="0" valign="middle" bgcolor="#FFFFFF" class="texture style9">Sex</td>
                    <td valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td width="8%" height="0" valign="middle" bgcolor="#FFFFFF"><div align="center">Male</div></td>
                    <td width="6%" valign="middle" bgcolor="#FFFFFF"><div align="center">
                        <?php			if($tiksex=="M"){
?>
                        <input type="radio" name="regtiksex" value="M" checked>
                        <?php			}	
			else
			{
?>
                        <input type="radio" name="regtiksex" value="M">
                        <?php				
			}			
							
?>
                    </div></td>
                    <td width="8%" valign="middle" bgcolor="#FFFFFF"><div align="center">Female</div></td>
                    <td width="42%" valign="middle" bgcolor="#FFFFFF"><?php			if($tiksex=="F"){
?>
                        <input type="radio" name="regtiksex" value="F" checked>
                        <?php			}	
			else
			{
?>
                        <input type="radio" name="regtiksex" value="F">
                        <?php				
			}			
							
?>
                        <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">*</font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td height="0" valign="middle" bgcolor="#FFFFFF" class="style9">Nationality</td>
                    <td valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="0" colspan="4" valign="middle" bgcolor="#FFFFFF"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">
                      <select name="regCountry" id="select5"  style="BORDER-RIGHT: #DBF1FB 1px solid; BORDER-TOP: #DBF1FB 1px solid; FONT-SIZE: 10pt; BORDER-LEFT: #DBF1FB 1px solid; BORDER-BOTTOM: #DBF1FB 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #DBF1FB" >
                        <option value="none">---Select Country---</option>
                        <?php
			$sql="select c_code,c_code_desc from mlm_combo_value  where c_code_type='CONT' order by c_code_desc ";
			$rs=mysql_query($sql);
			while ($adata = mysql_fetch_array ($rs)){
			$rname=$adata["c_code"];
			$rdesc=$adata["c_code_desc"];
			if($rname==$Country){
				echo "<option value='".$rname."' selected>".$rdesc."</option>";
			}	
			else
			{
				echo  "<option value='".$rname."'>".$rdesc."</option>";
			}
			}
	?>
                      </select>
                    </font><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">*</font></font></font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td width="23%" height="22" valign="middle" bgcolor="#FFFFFF" class="style9">Address Line1</td>
                    <td width="2%" valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="22" colspan="4" valign="middle" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtAddr1Reg" type="text" class="BPO_TEXT" id="txtAddr1Reg" size="70" maxlength="70"  value="<?php echo $Addr1Reg ?>">
                    </font><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">*</font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td width="23%" height="0" valign="middle" bgcolor="#FFFFFF" class="style9">Address Line2</td>
                    <td width="2%" valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="0" colspan="4" valign="middle" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtAddr2Reg" type="text" class="BPO_TEXT" id="txtAddr2Reg" size="70" maxlength="70" value="<?php echo $Addr2Reg ?>">
                    </font><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">*</font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td width="23%" height="0" valign="middle" bgcolor="#FFFFFF" class="style9">Address Line3</td>
                    <td width="2%" valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="0" colspan="4" valign="middle" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtAddr3Reg" type="text" class="BPO_TEXT" id="txtAddr3Reg" size="70" maxlength="50" value="<?php echo $Addr3Reg ?>">
                    </font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td height="0" valign="middle" bgcolor="#FFFFFF" class="style9">State/Province</td>
                    <td valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="0" colspan="4" valign="middle" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">
                      <input name="cmbStateReg" type="text" id="cmbStateReg" value="<?php echo $StateReg ?>">
                    *</font> </font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td height="22" valign="middle" bgcolor="#FFFFFF" class="style9">Zip / PostCode</td>
                    <td valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="22" colspan="4" valign="middle" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtPinCodeReg" type="text" class="BPO_TEXT" id="txtPinCodeReg" size="20" maxlength="6" value="<?php echo $PinCodeReg ?>" >
                    </font><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">*</font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td height="22" valign="middle" bgcolor="#FFFFFF" class="style9">Email ID</td>
                    <td valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="22" colspan="4" valign="middle" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtEmailReg" type="text" class="BPO_TEXT" id="txtEmailReg" size="20" maxlength="50" value="<?php echo $EmailReg ?>">
                    </font><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">*</font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td height="22" valign="middle" bgcolor="#FFFFFF" class="style9">Phone</td>
                    <td valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="22" colspan="4" valign="middle" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtPhoneReg" type="text" class="BPO_TEXT" id="txtPhoneReg" size="20" maxlength="25" value="<?php echo $PhoneReg ?>">
                    </font><font face="Arial, Helvetica, sans-serif" size="2"><b>&nbsp;</b></font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="top" bgcolor="#99CCFF">
                    <td height="22" valign="middle" bgcolor="#FFFFFF" class="style9">Mobile</td>
                    <td valign="middle" bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="22" colspan="4" valign="middle" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtPhone2Reg" type="text" class="BPO_TEXT" id="txtPhone2Reg" size="20" maxlength="25" value="<?php echo $Phone2Reg ?>" >
                      <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">*(Enter Valid GSM Mobile No  for SMS Alerts )</font></font></td>
                    <td valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
            <tr lign="left">
              <td height="30" background="images/footer_12.jpg" ><span class="style17"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Create your Account Details</font></span></td>
            </tr>
            <tr lign="left">
              <td height="30" bgcolor="#FFFFFF" ><table width="100%" height="0" border="0" cellpadding="4" cellspacing="4">
                  <tr align="left" valign="middle">
                    <td width="23%" height="0" class="style9">New Username</td>
                    <td width="2%"><font size="2" face="Arial, Helvetica, sans-serif"><b>:</b></font></td>
                    <td height="0" colspan="2" ><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtLogin" type="text" class="BPO_TEXT" size="20" maxlength="20" value="<?php echo $BsnsName ?>">
                    </font><font face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000" size="1">*</font><font face="Arial, Helvetica, sans-serif" size="1">(Max. <b>20 characters</b> - CAPITAL letters and DIGITS only) </font></td>
                  </tr>
                  <tr align="left" valign="middle">
                    <td height="0" class="texture"><font face="Arial, Helvetica, sans-serif" size="1">
                      <input type="button" name="Submit" value="Check username" onClick="makeactive();">
                    </font></td>
                    <td>&nbsp;</td>
                    <td width="66%" height="0" ><div class="style4" id="content"></div></td>
                    <td width="9%" >&nbsp;</td>
                  </tr>
                  <tr align="left" valign="middle">
                    <td width="23%" height="0" class="style9">New Password</td>
                    <td width="2%"><font size="2" face="Arial, Helvetica, sans-serif"><b>:</b></font></td>
                    <td height="0" ><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtPassword" type="text" class="BPO_TEXT" size="20" maxlength="20" value="<?php echo $Password ?>" >
                    </font><font face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000" size="1">*</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b> </b></font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
                    <td >&nbsp;</td>
                  </tr>
                  <tr align="left" valign="middle">
                    <td height="0" class="style9">Account PIN</td>
                    <td>&nbsp;</td>
                    <td height="0" ><select name="pin1" id="pin1" style=" BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; COLOR: #000000; BORDER-BOTTOM: 1px solid; ">
                        <option value="none">-NA-</option>
                        <?php
			 		$acpin1="";
			 		for($i=0; $i<=9;$i++)
			  		{
					if($i>9)
					$acpin1=$i;
					else
					$acpin1=$i;
					if($pin1==$i)  {
			    	?>
                        <option value="<?php echo $acpin1 ?>" selected="selected"><strong> <?php echo $acpin1 ?> </strong></option>
                        <?php
			  		}
					else
					{
					?>
                        <option value="<?php echo $acpin1 ?>"><strong> <?php echo $acpin1 ?> </strong></option>
                        <?php
					 }
					 }
			 		?>
                      </select>
                        <select name="pin2" id="pin2" style=" BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; COLOR: #000000; BORDER-BOTTOM: 1px solid; ">
                          <option value="none">-NA-</option>
                          <?php
			 		$acpin2="";
			 		for($i=0; $i<=9;$i++)
			  		{
					if($i>9)
					$acpin2=$i;
					else
					$acpin2=$i;
					if($pin2==$i)  {
			    	?>
                          <option value="<?php echo $acpin2 ?>" selected="selected"><strong> <?php echo $acpin2 ?> </strong></option>
                          <?php
			  		}
					else
					{
					?>
                          <option value="<?php echo $acpin2 ?>"><strong> <?php echo $acpin2 ?> </strong></option>
                          <?php
					 }
					 }
			 		?>
                        </select>
                        <select name="pin3" id="pin3" style=" BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; COLOR: #000000; BORDER-BOTTOM: 1px solid; ">
                          <option value="none">-NA-</option>
                          <?php
			 		$acpin3="";
			 		for($i=0; $i<=9;$i++)
			  		{
					if($i>9)
						$acpin3=$i;
					else
						$acpin3=$i;
					if($pin3==$i)  {
			    	?>
                          <option value="<?php echo $acpin3 ?>" selected="selected"><strong> <?php echo $acpin3 ?> </strong></option>
                          <?php
			  		}
					else
					{
					?>
                          <option value="<?php echo $acpin3 ?>"><strong> <?php echo $acpin3 ?> </strong></option>
                          <?php
					 }
					 }
			 		?>
                        </select>
                        <select name="pin4" id="pin4" style=" BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; COLOR: #000000; BORDER-BOTTOM: 1px solid; ">
                          <option value="none">-NA-</option>
                          <?php
			 		$acpin4="";
			 		for($i=0; $i<=9;$i++)
			  		{
					if($i>9)
					$acpin4=$i;
					else
					$acpin4=$i;
					if($pin4==$i)  {
			    	?>
                          <option value="<?php echo $acpin4 ?>" selected="selected"><strong> <?php echo $acpin4 ?> </strong></option>
                          <?php
			  		}
					else
					{
					?>
                          <option value="<?php echo $acpin4 ?>"><strong> <?php echo $acpin4 ?> </strong></option>
                          <?php
					 }
					 }
			 		?>
                        </select>
                        <font face="Verdana, Arial, Helvetica, sans-serif" size="1"><span class="style6">*</span></font></td>
                    <td >&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
            <tr lign="left">
              <td height="30" background="images/footer_12.jpg" ><span class="style18">Your sponser details</span></td>
            </tr>
            <tr lign="left">
              <td height="30" bgcolor="#FFFFFF" ><table width="100%" height="0" border="0" cellpadding="4" cellspacing="4">
                  <tr align="left" valign="middle">
                    <td height="0" class="style9">Refferal Username</td>
                    <td><font face="Arial, Helvetica, sans-serif" size="2"><b>:</b></font></td>
                    <td height="0"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtrefferal" type="text"  class="BPO_TEXT" id="txtrefferal" value="<?php echo $cRefferal ?>" size="20" maxlength="20">
                    </font><font face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000" size="1">*</font></td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr align="left" valign="middle">
                    <td height="0" class="style9">Upline Username </td>
                    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>:</b></font></td>
                    <td width="66%" height="0"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                      <input name="txtUpline" type="text"  class="BPO_TEXT" id="txtUpline" value="<?php echo $Upline ?>" size="20" maxlength="20">
                    </font><font face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000" size="1">*</font><font face="Verdana, Arial, Helvetica, sans-serif" size="1">&nbsp; </font></td>
                    <td width="9%">&nbsp;</td>
                  </tr>
                  
                  <tr align="left" valign="middle">
                    <td width="23%" height="0" class="style9">Side of Placement</td>
                    <td width="2%"><font size="2" face="Arial, Helvetica, sans-serif"><b>:</b></font></td>
                    <td height="0"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>
                      <?php			if($SideId=="l"){
?>
                      <input type="radio" name="radSide" value="l" checked>
                      <?php			}	
			else
			{
?>
                      <input type="radio" name="radSide" value="l" >
                      <?php				
			}			
							
?>
                    Left</b></font> <b><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                    <?php			if($SideId=="r"){
?>
                    <input type="radio" name="radSide" value="r" checked>
                    <?php			}	
			else
			{
?>
                    <input type="radio" name="radSide" value="r" >
                    <?php				
			}			
							
?>
                    Right</font></b><font size="2"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><font size="1"><font color="#FF0000">*</font></font></b></font></b></font></td>
                    <td>&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
            <tr lign="left">
              <td height="30" background="images/footer_12.jpg" ><span class="style18">Security Options For Your Account</span></td>
            </tr>
            <tr lign="left">
              <td height="30" bgcolor="#FFFFFF" ><table width="100%" height="0" border="0" cellpadding="4" cellspacing="4">
                  <tr align="left" valign="middle">
                    <td width="23%" height="24" class="style9">Secret Question</td>
                    <td width="2%"><font size="2" face="Arial, Helvetica, sans-serif"><b>:</b></font></td>
                    <td width="66%" height="24"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
                      <select name="cmbSecret" class="BPO_TEXT" id="cmbSecret">
                        <option value="none" selected><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Select a Secret Question</font></b></option>
                        <?php   	
		$sql="select c_code,c_code_desc from mlm_combo_value where c_code_type='QUEST'";
		$rs=mysql_query($sql);
		$numrows=mysql_num_rows($rs);
   		while($numrows >0)
   		{
			$numrows=$numrows-1;
        	$cCode=mysql_result($rs,$numrows,"c_code");
	       	$cCodeDesc=mysql_result($rs,$numrows,"c_code_desc");
			if($cCode==$SecretQuest){
				echo "<option value='".$SecretQuest."' selected>".$cCodeDesc."</option>";
			}	
			else
			{
				echo  "<option value='".$cCode."'>".$cCodeDesc."</option>";
			}			

       }
	   
?>
                      </select>
                    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><font size="1"><font color="#FF0000">*</font></font></b></font></b></td>
                    <td width="9%">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="middle">
                    <td height="24" class="style9">Answer</td>
                    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>:</b></font></td>
                    <td height="24"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
                      <input name="txtAnsw" type="text" class="BPO_TEXT" id="txtAnsw" value="<?php echo $Answ ?>" size="20" maxlength="50">
                    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><font size="1"><font color="#FF0000">*</font></font></b></font></b></td>
                    <td>&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
            <tr lign="left">
              <td height="30" background="images/footer_12.jpg" class="style18" >Prepaid Coupon Details </td>
            </tr>
            <tr lign="left">
              <td height="30" bgcolor="#FFFFFF" ><table width="100%" height="0" border="0" cellpadding="4" cellspacing="4">
                  <tr align="left" valign="middle">
                    <td width="23%" height="24" class="style9">Coupon user </td>
                    <td width="2%"><font size="2" face="Arial, Helvetica, sans-serif"><b>:</b></font></td>
                    <td width="66%" height="24"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
                      <input name="txtcouponuser" type="text" class="BPO_TEXT" id="txtcouponuser" value="<?php echo $ccouponuser ?>" size="20" maxlength="50">
                    </font><font size="1"><font color="#FF0000">*</font></font></b></font></b></td>
                    <td width="9%">&nbsp;</td>
                  </tr>
                  <tr align="left" valign="middle">
                    <td height="24" class="style9">Coupon password </td>
                    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>:</b></font></td>
                    <td height="24"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
                      <input name="txtcouponpassword" type="text" class="BPO_TEXT" id="txtcouponpassword" value="<?php echo $ccouponpassword ?>" size="20" maxlength="50">
                    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><font size="1"><font color="#FF0000">*</font></font></b></font></b></td>
                    <td>&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
            <tr lign="left">
              <td height="30" background="images/footer_12.jpg" >Agree the terms and conditions </td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td height="0" align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="4" cellpadding="4">
                  <tr>
                    <td width="100%" colspan="3" align="left" valign="middle" class="texture"><input name="termCheck" type="checkbox" id="termCheck" value="checkbox" onClick="submHide();">
                    I agreed all the <a href="terms.php" target="_parent"> terms</a> of the Company </td>
                  </tr>
                  <tr style=" display:none" id="submitIdHide">
                    <td colspan="3" align="left" valign="middle" class="texture"><div align="center">
                        <input name="Submit2" type="submit" class="style13" style="background:url(images/footer_12.jpg)" value="Submit  Registration" >
                    </div></td>
                  </tr>
              </table></td>
            </tr>
          </table>
      </form></td>
  </tr>
</table></td>
            </tr>
          </table>          
          <p>&nbsp;</p>
</td>
	</tr>
	<tr>
		<td valign="top" background="images/inner_15.jpg"><table width="95%" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><div class="arrowlistmenu">
                <ul>
                  <li><a href="validation_success.php" class="style1 style7">Control Panal  </a></li>
                  <li><a href="registration_step1.php" class="style1">Registration</a></li>
                  <li><a href="geneology.php" class="style1">Geneology </a></li>
                  <li><a href="amount_transfer.php" class="style1">Amount Transfer  </a></li>
                  <li><a href="amount_transfer_details.php" class="style1">Transaction Details  </a></li>
                  <li><a href="pindetails.php" class="style7">Received Coupon Details  </a></li>
				  <li><a href="user_profile.php" class="style7">View Profile   </a></li>
				  <li><a href="change_password.php" class="style7">Password Change </a></li>
				  <li><a href="logout.php" class="style7">Logout  </a></li>
                </ul>
            </div></td>
          </tr>
        </table>	    <p>&nbsp;</p></td>
	</tr>
	<tr>
		<td colspan="10">
			<img src="images/inner_16.jpg" width="1003" height="23" alt=""></td>
	</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
<?php
	}
	}
	else
	{
		$errormsg="Your session is expeired. Please login again.";
		header("location: index.php?error=$errormsg");
	}
?>

